Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Accessing Objects Directly

QuickDraw 3D provides low-level routines that you can use to find and manipulate objects in a file by reading sequentially through all the objects in it.

Q3File_GetNextObjectType

You can use the Q3File_GetNextObjectType function to get the type of the next object in a file.

TQ3ObjectType Q3File_GetNextObjectType (TQ3FileObject file);
file
A file object.

DESCRIPTION

The Q3File_GetNextObjectType function returns, as its function result, the type of the next object in the file object specified by the file parameter. Depending on the type of that object, you can then call Q3File_ReadObject to read it or Q3File_SkipObject to skip it.

If an error occurs, Q3File_GetNextObjectType returns the value kQ3ObjectTypeInvalid .

Q3File_IsNextObjectOfType

You can use the Q3File_IsNextObjectOfType function to determine whether the next object in a file is of a certain type.

TQ3Boolean Q3File_IsNextObjectOfType (
                     TQ3FileObject file,
                     TQ3ObjectType ofType);
file
A file object.
ofType
An object type.

DESCRIPTION

The Q3File_IsNextObjectOfType function returns, as its function result, a Boolean value that indicates whether the next object in the file object specified by the file parameter is of the type specified by the ofType parameter ( kQ3True ) or not ( kQ3False ).

Q3File_ReadObject

You can use the Q3File_ReadObject function to read the next object in a file.

TQ3Object Q3File_ReadObject (TQ3FileObject file);
file
A file object.

DESCRIPTION

The Q3File_ReadObject function returns, as its function result, the next object in the file specified by the file parameter. If an error occurs, Q3File_ReadObject returns the value NULL .

Q3File_SkipObject

You can use the Q3File_SkipObject function to skip over an object in a file.

TQ3Status Q3File_SkipObject (TQ3FileObject file);
file
A file object.

DESCRIPTION

The Q3File_SkipObject function skips the next object in the file object specified by the file parameter. Note that Q3File_SkipObject skips the next object whether or not you have already called Q3File_GetNextObjectType to get information about that object's type.

Q3File_IsEndOfFile

You can use the Q3File_IsEndOfFile function to determine whether the file position of a file object is at the end of the file.

TQ3Boolean Q3File_IsEndOfFile (TQ3FileObject file);
file
A file object.

DESCRIPTION

The Q3File_IsEndOfFile function returns, as its function result, a Boolean value that indicates whether the current file position of the file object specified by the file parameter is at the end of the file ( kQ3True ) or not ( kQ3False ).

ERRORS

kQ3ErrorFileNotOpen kQ3ErrorInvalidObjectParameter kQ3ErrorNULLParameter


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |